package com.kolaxy.provideruser.controller;

import com.kolaxy.provideruser.bean.User;
import com.kolaxy.provideruser.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <一句话功能描述><功能详细描述>
 *
 * @author zhourunjin
 * @version: [版本号，2018-09-19]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@RestController
public class UserController {

    @Autowired
    private UserDao userDao;

    @RequestMapping("/{id}")
    public User findUserById(@PathVariable Integer id){
        User one = userDao.getOne(id);
        return one;
    }

}
